<template>
	<view class="p-[20rpx] pb-[50rpx] bg-[#fff]" v-html="content"></view>
</template>

<script setup>
	import {
		onLoad
	} from "@dcloudio/uni-app"
	import {memberprotocol} from "@/api/home.js"
	import {
		ref
	} from "vue";
	import {
		BASE_URL
	} from "@/utils/Server/index.js"

	const src = ref(`${BASE_URL}/miniapp/member/v2/member/protocol
?id=`)
	const title = ref("协议")
	const index = ref(0)
	const webviewStyles = {
		progress: {
			color: '#FF3333'
		}
	}
	const content=ref('')

	onLoad((e) => {
		if (e.index) {
			index.value = e.index
			src.value += e.index
			memberprotocol({id:e.index}).then(res=>{
				content.value=res.result.content
				uni.setNavigationBarTitle({
					title: res.result.name
				})
			})
		}
		if (e.title) {
			title.value = e.title
		}


	})
</script>

<style lang="scss">

</style>